package com.hoasua.adb.example;

import android.annotation.SuppressLint;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;

import com.hoasua.adb.adbSqlHelper;

/**
 * Extends from aSqlHelper. Must set path of database in aSqlHelper.class first
 * */
@SuppressLint("SdCardPath")
public class DataBaseHelper extends adbSqlHelper {
	public static final String TAG="class: DataBaseHelper";
	
	// The Android's default system path of your application database.
		@SuppressLint("SdCardPath")
		private static String DB_PATH = "/sdcard/dating/store/";

		private static String DB_NAME = "dating.sqlite";
		
	/**
	 * initial Database helper.
	 * @see must call init(Context, DataBaseHelper) method after constructor
	 * */
	public DataBaseHelper(Context context) {
		super(context,DB_PATH,DB_NAME);
		Log.e("package",context.getApplicationContext().getPackageName());
	}
	@Override
	public void createAdb(SQLiteDatabase db) {
		db.execSQL(getSql(ObjectManagerExample.TABLE,ObjectManagerExample.COLUMNS));
	}
	@Override
	public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
		// TODO Auto-generated method stub
		
	}
}